import React from 'react'
import PropTypes from "prop-types"

const ToDo= ({onClick,completed,text})=>(
    <li
        onClick={onClick}
        style={{textDecoration : completed ? 'line-through' : "none"}}
    >{text}</li>
);

ToDo.prototype  = {
    text:PropTypes.string.isRequired,
    completed:PropTypes.bool.isRequired,
    onClick:PropTypes.func.isRequired
};
export default ToDo